import MyReq from "@/request/axios";
import { AccountLoginReq } from "./req";
import { AccountLoginRes } from "./res";

export const AccountApi = {
    // 登录
    login: (req: AccountLoginReq): Promise<AccountLoginRes> => {
      return MyReq.post(`/user/login`, req);
    }, 
    // 退出登录
    logout: (): Promise<undefined> => {
      return MyReq.get(`/user/logout`);
    },
  };